<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="keyword" content="">

    <title>项目族库 - BIM管理</title>

    <!-- Bootstrap core CSS -->
    <link href="/Public/css/bootstrap.min.css" rel="stylesheet">
    <link href="/Public/css/bootstrap-reset.css" rel="stylesheet">
    <!--external css-->
    <link href="/Public/assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
    <!-- Custom styles for this template -->
    <link href="/Public/css/style.css" rel="stylesheet">
    <link href="/Public/css/style-responsive.css" rel="stylesheet" />
    <!-- new styles-->
      <link href="/Public/css/xxxstyle.css" rel="stylesheet" />

      <!-- HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->
    <!--[if lt IE 9]>
      <script src="/Public/js/html5shiv.js"></script>
      <script src="/Public/js/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>
  <section id="container">
      <!--main content start-->
      <section id="main-content">
          <section class="wrapper site-min-height">
              <!-- page start-->
                  <nav class="navbar navbar-inverse navbar-library" role="navigation">
                      <div class="collapse navbar-collapse navbar-ex1-collapse">
                          <!--<ul class="nav navbar-nav">-->
                              <!--<li class="dropdown">-->
                                  <!--<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">类目<b class="caret"></b></a>-->
                                  <!--<ul class="dropdown-menu">-->
                                      <!--<li><a href="#">A</a></li>-->
                                      <!--<li><a href="#">B</a></li>-->
                                  <!--</ul>-->
                              <!--</li>-->
                          <!--</ul>-->
                          <ul class="nav navbar-nav yamm mega-menu">
                              <li class="dropdown">
                                  <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">类型</a>
                                  <ul class="dropdown-menu wide-full">
                                      <div class="yamm-content">
                                          <ul class="listCategories listCaType">
                                             <?php if(is_array($cate['type'])): foreach($cate['type'] as $k=>$v): ?><li onclick="ajaxlibrary(1,'',1,'<?php echo ($v["name"]); ?>')"><a>
	                                                  <span class="tooltips" data-toggle="tooltip" data-original-title="<?php echo ($v["name"]); ?>" data-placement="top"><img src="/Public/imgLibrary/icon/<?php echo ($v["img"]); ?>" /></span>
	                                              </a></li><?php endforeach; endif; ?>
                                          </ul>
                                      </div>
                                  </ul>
                              </li>
                          </ul>
                          <ul class="nav navbar-nav yamm mega-menu">
                              <li class="dropdown">
                                  <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">产品系列</a>
                                  <ul class="dropdown-menu wide-full">
                                      <li>
                                          <div class="yamm-content">
                                              <ul class="listCategories">
                                               <?php if(is_array($cate['series'])): foreach($cate['series'] as $k=>$s): ?><li onclick="ajaxlibrary(1,'',2,'<?php echo ($s["name"]); ?>')"><a>
                                                      <span class="tooltips" data-toggle="tooltip" data-original-title="<?php echo ($s["name"]); ?>" data-placement="top"><img src="/Public/imgLibrary/icon/<?php echo ($s["img"]); ?>" /></span>
                                                  </a></li><?php endforeach; endif; ?>
                                              </ul>
                                          </div>
                                      </li>
                                  </ul>
                              </li>
                          </ul>
                          <ul class="nav navbar-nav yamm mega-menu">
                              <li class="dropdown">
                                  <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">文件类型</a>
                                  <ul class="dropdown-menu wide-full">
                                      <div class="yamm-content">
                                          <ul class="listFileType">
                                           <?php if(is_array($cate['file_type'])): foreach($cate['file_type'] as $k=>$f): ?><li onclick="ajaxlibrary(1,'',3,'<?php echo ($f["name"]); ?>')"><a>
                                                  <span><img src="/Public/imgLibrary/icon/<?php echo ($f["img"]); ?>" /></span>
                                                  <p><?php echo ($f["name"]); ?></p>
                                              </a></li><?php endforeach; endif; ?>   
                                          </ul>
                                      </div>
                                  </ul>
                              </li>
                          </ul>
                          <ul class="nav navbar-nav yamm mega-menu">
                              <li class="dropdown">
                                  <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">品牌</a>
                                  <ul class="dropdown-menu wide-full">
                                      <div class="yamm-content">
                                          <ul class="listFileType">
                                           <?php if(is_array($cate['brand'])): foreach($cate['brand'] as $k=>$b): ?><li onclick="ajaxlibrary(1,'',4,'<?php echo ($b["id"]); ?>')"><a>
                                                  <span><?php echo ($b["name"]); ?></span>
                                              </a></li><?php endforeach; endif; ?>
                                          </ul>
                                      </div>
                                  </ul>
                              </li>
                          </ul>
                      </div>
                  </nav>
                  <section class="panel mb10">
                      <div class="panel-body pbodypad10">
                          <div class="input-group searchLine">
	                              <input type="text" name="searchname" placeholder="搜索..." class="input-sm form-control">
	                          <span class="input-group-btn">
	                            <button type="button" class="btn btn-sm btn-submit searchBtn" onclick="search()"><i class="icon-search"></i></button>
	                          </span>
                          </div>
                       <?php if($pdata == 2): ?><a href="<?php echo U('Family/libraryadd');?>">
                           <div class="pull-right" style="margin-top:-25px;">
						         <button type="button" class="btn btn-submit btn-xs"><i class="icon-plus"></i>添加产品</button>
						   </div>
						  </a>
						  <?php else: ?>
						   <div class="pull-right" style="margin-top:-25px;">
						          <button class="btn btn-default btn-xs"><i class="glyphicon glyphicon-exclamation-sign"></i>无权限添加产品</button>
						   </div><?php endif; ?>
                      </div>
                  </section>
                  <section class="panel">
                    <div id="ajaxlibrary">
                     
				    </div>
                  </section>
              <!-- page end -->
          </section>
      </section>
      <!--main content end-->
  </section>
    <!-- js placed at the end of the document so the pages load faster -->
    <script src="/Public/js/jquery.js"></script>
    <script src="/Public/js/jquery-1.8.3.min.js"></script>
    <script src="/Public/js/bootstrap.min.js"></script>
    <script class="include" type="text/javascript" src="/Public/js/jquery.dcjqaccordion.2.7.js"></script>
    <script src="/Public/js/jquery.scrollTo.min.js"></script>
    <script src="/Public/js/jquery.nicescroll.js" type="text/javascript"></script>
    <script src="/Public/js/jquery.customSelect.min.js" ></script>

    <!--common script for all pages-->
    <script src="/Public/js/common-scripts.js"></script>

    <!--new script for this page only-->
  </body>
</html>
<script>
	$(document).ready(function(){
		ajaxlibrary();
	});
	
	// ajax 抓取页面
	function ajaxlibrary(page=1,name='',status='',type=""){
	        $.ajax({
	            type : "POST",
	            url:'/Home/Family/ajaxlibrary/p/'+page,
	            data : {name:name,type:type,status:status},
	            success: function(data){
	                $("#ajaxlibrary").html('');
	                $("#ajaxlibrary").append(data);
	            }
	        });
	}
	
	  //search
    function search(){
  	  var name = $("input[name='searchname']").val();
 	 	ajaxlibrary(1,name);
    }
</script>